[Feature] Create Radio Button Component #586
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Created the Radio button component. Given the extreme similarities to Checkbox/Checkbox group, this involved pulling out a shared component (
CheckboxRadio
) to have shared code under the hood and basically just conditionally swap the icon. Then Radio button itself was formed off modifying Checkbox group so only one would be selected.Testing Packages
Screenshots/Video
iOS: Not recorded in Storybook because ExpoGo app was updated and, unlike Android, there's no way to install an older version so it's out of commission until we update dependencies to the newer SDK.
Android:
Screen_Recording_20241122-135343_Expo.Go.mp4
Web:
Screen.Recording.2024-11-22.at.1.17.27.PM.mov
Flagship (iOS):
RPReplay_Final1732303336.MP4
Flagship (Android):
Screen_Recording_20241122-133931_VA.mp4
Testing
Smoke tested nothing appeared to break with existing Checkbox/Checkbox group with the transition to shared underlying component with Radio.
Validated Radio button appeared to be behaving as expected in Web/iOS/Android (including iOS/Android in flagship). One bug noted with VoiceOver (iOS) only where it intermittently (more often than not, but not always) when activating a different radio will read out that it is unselected then immediately read out again that it is selected; bug #596 created.
PR Checklist
Code reviewer validation:
changelog
label applied if it's to be included in the changelogPublish
If changes warrant a new version per the versioning guidelines and the PR is approved and ready to merge:
main
into branchmain